package com.demo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.demo.core.exception.ParameterException;
import com.demo.domain.TeamComposition;
import com.demo.domain.TeamProfile;
import com.demo.domain.ro.TeamProfileRequest;

import java.util.List;

public interface TeamProfileService extends IService<TeamProfile> {

    TeamProfile getByTpId(Long tpId) throws ParameterException;

    Integer insertTeamProfile(TeamProfile teamProfile) throws ParameterException;

    Integer updateTeamProfile(TeamProfile teamProfile) throws ParameterException;

    Integer deleteTeamProfileById(TeamProfile teamProfile) throws ParameterException;

    List<TeamProfile> selectTeamProfileList(TeamProfile teamProfile) throws ParameterException;

    List<TeamProfile> listAllTeamProfile();

    //得到队伍详情信息
    TeamProfile getTeamProfileById(Long tpId, Long uid) throws ParameterException;

    //    得到uid未参与的队伍的信息
    List<TeamProfile> getNotInTeam(Long uid, int current, int size) throws ParameterException;

    //  得到uid参加的队伍
    List<TeamProfile> getInTeam(Long uid) throws ParameterException, Exception;

    //    根据相关搜索条件对队伍进行搜索
    Page<TeamProfile> getTeamByConditions(TeamProfileRequest teamProfileRequest)
            throws ParameterException, Exception;

    //创建队伍
    String organizeTeam(TeamProfile teamProfile, Long uid) throws Exception;

    //    修改队伍信息
    String modifyTeamMsg(TeamProfile teamProfile, Long uid) throws Exception;

    //解散队伍
    String dismissTeam(Long tpId, Long uid) throws ParameterException, Exception;

}
